package com.yu.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OssConfig {

    @Bean
    public OSS ossClient(){
        String endpoint = "oss-cn-shenzhen.aliyuncs.com";
        String accessKeyId = 阿里云的accessKeyId;
        String accessKeySecret = 阿里云的accessKeySecret;
        OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
        return ossClient;
    }
}
